<!DOCTYPE html>
<html>

<head>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <title>天翼区块链路由器</title>
    <link href="<%=resource%>/imgs/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon">
    <link rel="stylesheet" href="<%=resource%>/index.css">
    <script type="text/javascript" src="<%=resource%>/jquery/jquery-1.9.1.min.js"></script>
    <script type="text/javascript" src="<%=resource%>/js/menu.js"></script>
    <script type="text/javascript" src="<%=resource%>/js/md5.js"></script>
    <link href="<%=resource%>/layer/skin/default/layer.css" rel="stylesheet">
    <script src="<%=resource%>/layer/layer.js"></script>
    <style>
        .wrap {
            background-color: transparent;
        }

        @media screen and (max-width: 768px){
            .wrap {
                background-color: #fff;
            }
        }
    </style>
</head>

<body style="position: relative">
<div class="wrap">
    <div id="head">
        <span style="margin-left:60px;"></span><img src="<%=resource%>/imgs/logo.png">
        <span style="margin-left:20px;">天翼区块链路由器</span>
        <a href="http://www.skywindlink.com/" target="_blank">访问官网</a>
        <a class="qrcode">APP下载
            <div class="d">
                <img src="<%=resource%>/imgs/qrcode.jpg">
            </div>
        </a>
    </div>
    <div class="lgbar">
        <div class="panel clearfix">
            <div class="i i1">
                <div class="tt">
                    <div class="t">
                        <img src="<%=resource%>/imgs/logo.png">
                    </div>
                </div>
                <div class="tt2">
                    <div class="t">天翼区块链路由器</div>
                </div>
                <div class="t3">
                    <img src="<%=resource%>/imgs/login-b.png" style="">
                </div>
            </div>
            <div class="i">
                <div class="t t1">
                    <img src="<%=resource%>/imgs/phoneLogo.png" alt="">
                    <span>登录</span>
                </div>
                <div class="t t2">
                    <div class="ti">密码</div>
                    <div><input type="password" id="luci_password" class="cin" placeholder="请输入您的密码"></div>
                </div>
                <div class="t t3">
                    <button class="btn" onclick="login()">登录</button>
                </div>
                <div class="t4">
                    <a href="http://www.skywindlink.com/" target="_blank">访问官网</a><span style="margin: 0 10px">|</span><span id="qr-code" onclick="showQr()">下载APP</span>
                    <div class="p-qr">
                        <img src="<%=resource%>/imgs/qrcode.jpg">
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="footer" style="position: absolute;">
        <span> Copyright©2018 skywindlink.com All Rights Reserved.</span>
    </div>
</div>
<div id="phone-footer">
    <span> Copyright©2018 skywindlink.com All Rights Reserved.</span>
</div>
    <script type="text/javascript">
        $(document).keypress(function(e) {
            var ecode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode;
            if (ecode == 13) {
                login();
            }
        });

        function login() {
            var password = $('#luci_password').val();
            if ($.trim(password).length == 0) {
                utils.alert("请输入密码");
            } else {
                password = $.md5(password);
                var user = {
                    luci_username: "admin",
                    luci_password: password
                };
                var url = '<%=luci.dispatcher.build_url("login", "system", "login")%>';
                $.post(url, $.param(user), function(data) {
                    if (data.code == 0) {
                        window.location.href = data.result.url;
                    } else {
                        utils.alert("密码不正确");
                    }
                });
            }
        }

        function showQr() {
                if ($('.p-qr').css('display') === 'none') {
                    $('.p-qr').css('display','block');
                } else {
                    $('.p-qr').css('display','none');
                }
        }
    </script>
</body>

</html>